﻿
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication10
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.Write("Введите год ");
            int year = Convert.ToInt32(Console.ReadLine());          
            Console.Write("Введите месяц (номер) ");
            int month = Convert.ToInt32(Console.ReadLine());          
            Console.Write("Введите день ");
            int date = Convert.ToInt32(Console.ReadLine());           
            int count = date;      
            if (year % 4 == 0)
            {
                int[] rule = { 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
                for (int i = 1; i < month; i++)
                {
                    count += rule[i];
                }
            }
            else
            {
                int[] rule = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
                for (int i = 1; i < month; i++)
                {
                    count += rule[i];
                }               
            }
            Console.WriteLine();
            Console.WriteLine("С начала года идет " + count + "й день");
            Console.ReadLine();
        }
    }
}
